﻿using System;
using Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FwProject.Core.Restaurant;
using FwProject.Core.Distribution;
using FwProject.Core.FactoryInfo;
using FwProject.Core.Car;
using Abp.AutoMapper;
using System.Collections.Generic;
using FwProject.Car.Dto;
using FwProject.Restaurant.Dto;
using Abp.Domain.Entities;

namespace FwProject.Distribution.Dto
{
    [AutoMap(typeof(DistributionInfo))]
    public class DistributionHistoryDetailsDto : Entity<Guid>,ICreationAudited
    {  

        /// <summary>
        /// 餐厅编号
        /// </summary>
        /// <value>The restaurantid.</value>

        [Display(Name ="餐厅编号")]
        public Guid Restaurantid { get; set; }
 
        public RestaurantHistoryDto RestaurantInfoModel { get; set; }
     

        [Display(Name = "配送单号")]
        public string CreationNumber { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        /// <value>The pricestatus.</value>

        [Display(Name = "支付状态")]
        public Pricestatus Pricestatus { get; set; } = Pricestatus.已配送;
        /// <summary>
        /// 应支付金额
        /// </summary>
        /// <value>The price.</value>

        [Display(Name = "应支付金额")]
        public decimal TotalPrice { get; set; } = 0;
        /// <summary>
        /// 当前车辆所有的型号
        /// </summary>
        public  List<DistributionDetailsHistoryDto> DistributionInfoListDetails { get; set; }

        public long? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }

       
    }
    #region 缩减模型
    [AutoMap(typeof(RestaurantInfo))]
    public class RestaurantHistoryDto
    {

        [Display(Name = "餐厅名称")]
        public string RestaurantName { get; set; }

        /// <summary>
        /// 餐厅地址
        /// </summary>
        /// <value>The restaurant address.</value>
        [Display(Name = "餐厅地址")]
        public string RestaurantAddress { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        /// <value>The longitude.</value>

        [Display(Name = "经度")]
        public string longitude { get; set; }


        /// <summary>
        /// 纬度
        /// </summary>
        /// <value>The latitude.</value>

        [Display(Name = "纬度")]
        public string latitude { get; set; }

        /// <summary>
        /// 餐厅联系人
        /// </summary>
        public string RestaurantContact { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Mobile { get; set; }

    }

    [AutoMap(typeof(DistributionInfoDetails))]
    public class DistributionDetailsHistoryDto:Entity<Guid>
    {
        public Guid DistributionInfoId { get; set; }
        public string TypeNumberName { get; set; }

        /// <summary>
        /// 本次配送套数
        /// </summary>
        /// <value>The distributioncount.</value>
        [Display(Name = "本次配送套数")]
        public int Distributioncount { get; set; } = 0;
        /// <summary>
        /// 回收
        /// </summary>
        /// <value>The recoverycount.</value>
        [Display(Name = "回收")]
        public int Recoverycount { get; set; } = 0;
        /// <summary>
        /// 换货
        /// </summary>
        /// <value>The exchangegoodscount.</value>
        [Display(Name = "换货")]
        public int Exchangegoodscount { get; set; } = 0;
        /// <summary>
        /// 折损
        /// </summary>
        /// <value>The damagecount.</value>
        [Display(Name = "折损")]
        public int Damagecount { get; set; } = 0;
        /// <summary>
        /// 赠送
        /// </summary>
        /// <value>The givecount.</value>
        [Display(Name = "赠送")]
        public int Givecount { get; set; } = 0;
        /// <summary>
        /// 退箱
        /// </summary>
        /// <value>The backboxcount.</value>
        [Display(Name = "退箱")]
        public int Backboxcount { get; set; } = 0;
        /// <summary>
        /// 退数
        /// </summary>
        /// <value>The backnumbercount.</value>
        [Display(Name = "退数")]
        public int Backnumbercount { get; set; } = 0;

    }
    #endregion

}
